package com.gome.ocean.service.authority;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.github.pagehelper.Page;
import com.gome.ocean.dao.model.authority.Function;
import com.gome.ocean.dao.model.authority.MenuRoleVO;
import com.gome.ocean.dao.model.authority.MenuSource;
import com.gome.ocean.dao.model.authority.Module;
import com.gome.ocean.dao.model.authority.RoleMenu;
 
/**
 * 
 *
 * @author liyuefeng
 */
public interface MenuRoleService {

	List<MenuSource> getMenuLevelList(@Param("pid") Integer pid, @Param("level") Byte level);

	Integer saveMenuInfo(MenuSource menuSource);

	List<MenuSource> getMenuInfoListByPage(Map<String, Object> param);

	int getMenuInfoListCountByPage(Map<String, Object> param);

	int updateByPrimaryKeySelective(MenuSource menuSource);

	int saveMenuRoleInfo(RoleMenu roleMenu);

	int getRoleMenuCountByParam(RoleMenu record);

	int updateByRoleMenuPrimaryKeySelective(RoleMenu roleMenu);

	int getRoleMenuCountByRoleId(Integer roleId);

	List<MenuRoleVO> findMenuRoleByParams(Map<String, Object> param, int pageNum, int pageSize);

	List<MenuRoleVO> findMenuRoleByRoleId(Map<String, Object> param);

	List<Module> getAllModule();

	List<Function> getFunctionGroupByModuleId(Long moduleId);

	List<MenuRoleVO> getAllMenu();

	Page<MenuSource> findAllMenu(int pageNum, int pageSize);

	MenuSource findMenuByName(String menuName);

	boolean insertMenuRoleList(List<RoleMenu> RoleMenu);

	boolean deleteMenuRoleByRoleId(Integer roleId);

	List<RoleMenu> getRoleMenusByRoleId(Integer roleId);

	List<Map<String, Object>> getRoleFunctionList(Map<String, Object> param);

	String getMenuRoleFunctions(Map<String, Object> params);

	MenuSource selectByPrimaryKey(Integer id);

	int deleteByPrimaryKey(Integer id);
}
